// 栈
class Stack<T> {
    private data:T[] = []
    push(item:T) {
        return this.data.push(item)
    }
}
const s1 = new Stack<number>()
s1.push(42)
const s2 = new Stack<string>()
s2.push('2')